package com.woniuxy.school.dietary.food.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.school.dietary.food.entity.FoodInfo;
import com.woniuxy.school.dietary.food.model.dto.FoodDto;
import com.woniuxy.school.dietary.food.model.from.AddFoodForm;
import com.woniuxy.school.dietary.food.model.from.FindFoodFrom;
import com.woniuxy.school.dietary.food.model.from.UpdateFoodFrom;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 吴彦祖
 * @since 2025年05月14日
 */
public interface FoodInfoService extends IService<FoodInfo> {
    FoodDto findFood(FindFoodFrom from);

    void updateFood(UpdateFoodFrom from);

    void addFood(AddFoodForm addFoodForm, String userId) throws IOException;

    void deleteFood(Long id, String userId);

    Page<FoodInfo> findFoodByStoreId(Long storeId,  Integer pageNum, Integer pageSize);

    List<FoodInfo> findFoodByProductsId(Long productsId);
}
